﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Stilovi_Default : System.Web.UI.Page
{
    KorisnickiDioUtility utility;
    protected void Page_Load(object sender, EventArgs e)
    {
        Title = "Svijet Drveća - Naslovna";
        utility = new KorisnickiDioUtility();
        KorisnickiDioUtility.Clanak cl = new KorisnickiDioUtility.Clanak();
        cl = utility.ClanakHtml(utility.ClanakID("Naslovna"));
        foreach(string str in cl.sadrzaj)
        sadrzaj.InnerHtml += str;


        List<EnciklopedijaDrvecaModel.Clanak> clanci = utility.AktualniClanci();
        foreach (EnciklopedijaDrvecaModel.Clanak c in clanci)
        {
            string[] str = c.TextClanka.Split(new string[] { "<br id='delimiter' />", "<br id=\"delimiter\" />" }, StringSplitOptions.None);
            div_aktualno.InnerHtml+= "<div class='par'>";
            div_aktualno.InnerHtml += "<p><a class='link2' href='Clanak.aspx?id=" + c.ClanakID + "'>" + c.NazivClanka + "</a></p>";
            div_aktualno.InnerHtml += "<br />";
            div_aktualno.InnerHtml += str[0];
            div_aktualno.InnerHtml += "</div>";
        }
    }
}